package com.example.shoppingmall.dao;

import com.example.shoppingmall.pojo.Articlelist;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ArticleMapper {

    //文章列表：分页查询+条件查询+排序
    public List<Articlelist> getarticlelistall(@Param("create") String create,@Param("upddate") String upddate,
                                               @Param("status") String status,@Param("sorts") String sorts,
                                               @Param("updatedate") String updatedate,@Param("title") String title,
                                               @Param("releaseStatus") String releaseStatus,
                                               @Param("pageno") Integer pageno,@Param("pageSize") Integer pageSize);

    //查询总条数
    public int allcount(@Param("updatedate") String updatedate,@Param("title") String title,
                        @Param("releaseStatus") String releaseStatus);

    //删除操作
    public int delarticle(@Param("id") Integer id);

    //修改操作
    public int updarticle(Articlelist articlelist);

    //查询详情
    public Articlelist selarticle(@Param("id") Integer id);

    //新增文章操作
    public int addarticle(Articlelist articlelist);
}
